<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/css/staly.css">
    <title>登录</title>
</head>
<body>
<span id="error-message" th:text="${msg}"></span>
<div class="control">
    <div class="item">

        <div class="active">登录</div>
    </div>
    <div class="content">

        <div style="display: block;">
            <form action="/user/login" method="post">
                <p>账号</p>
                <input type="text" placeholder="请输入用户名" name="username"/>

                <p>密码</p>
                <input type="password" placeholder="请输入密码"  name="password"/>
                <br/>
                <input type="submit" value="登录"/>

            </form>

            <p>没有账号，<a href="./register.html" target="top">去注册</a></p>

        </div>

    </div>
</div>
<script>
    window.onload = function() {
        var errorMessage = document.getElementById('error-message');
        if (errorMessage.textContent.trim() !== '') {
            setTimeout(function() {
                errorMessage.style.display = 'none';
            }, 3000);
        }
    };
</script>
</body>
</html>